package com.itheima.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * @author 16778
 * @version 1.0
 * @date 2025/9/23 20:22
 */
@Slf4j
@Component
@Aspect
public class MyAspect2 {
//    @Before("execution(void deleteById(java.lang.Integer))")
//    @Before("execution(void com.itheima.service.impl.DeptServiceImpl.deleteById(java.lang.Integer))")
//    @Before("execution(public void com.itheima.service.impl.DeptServiceImpl.deleteById(java.lang.Integer))")
//    @Before("execution(* com.itheima.service.impl.DeptServiceImpl.deleteById(java.lang.Integer))")
//    @Before("execution(* com.itheima.service.impl.DeptServiceImpl.delet*(java.lang.Integer))")
//    @Before("execution(* com.itheima.service.impl.DeptServiceImpl.*e(java.lang.Integer))")
//    @Before("execution(* com.itheima.*.impl.DeptServiceImpl.deleteById(java.lang.Integer))")
//    @Before("execution(* com.itheima.service.impl.DeptServiceImpl.deleteById(java.lang.Integer)) ||" +
//        "execution(* com.itheima.service.impl.DeptServiceImpl.deleteById(java.lang.Integer))")
    //两个..代表任意个任意参数 *代表任意一个

//    @Before("@annotation(com.itheima.anno.LogOperation)")
    public void before(){
        log.info("MyAspect-> berfore ...");
    }
}
